<?php
class Zend_View_Helper_MakeUrlSite extends Zend_View_Helper_Abstract
{
    /**
     * Make url site
     * @param <int> $type 1-detail, 2-bai du thi, 3-bai du thi noi bat, 4-bai du thi cua ban
     *                    5-doi bong tieu bieu, 6-lich su euro, 7-post bai, 8-preview bai viet
     *                    9-the le, 10-giai thuong, 11-error
     * @param <array> $param
     * @return <string>
     */
    public function MakeUrlSite($type, $param=null)
    {
        $return = '';
        switch ( $type )
        {
            case 1: //Detail
                $return = BASE_URL_CLUB.'/chi-tiet/'.Util_String::convert($param['title']).'-'.$param['id'].'.html';
                break;
            case 2: //Bai du thi
                $return = BASE_URL_CLUB.'/danh-sach/bai-du-thi-0-'.$param['page'].'.html';
                break;
            case 3: //Bai du thi noi bat
                $return = BASE_URL_CLUB.'/danh-sach/bai-du-thi-noi-bat-3-'.$param['page'].'.html';
                break;
            case 4: //Bai du thi cua ban
                $return = BASE_URL_CLUB.'/bai-thi-cua-ban-'.$param['page'].'.html';
                break;
            case 5: //Doi bong tieu bieu
                $return = BASE_URL_CLUB.'/danh-sach/doi-bong-tieu-bieu-1-'.$param['page'].'.html';
                break;
            case 6: //Lich su euro
                $return = BASE_URL_CLUB.'/danh-sach/lich-su-euro-2-'.$param['page'].'.html';
                break;
            case 7: //Post bai
                $return = BASE_URL_CLUB.'/post.html';
                break;
            case 8: //Preview bai viet
                $return = BASE_URL_CLUB.'/preview.html';
                break;
            case 9: //The le
                $return = BASE_URL_CLUB.'/the-le.html';
                break;
            case 10: //Giai thuong
                $return = BASE_URL_CLUB.'/giai-thuong.html';
                break;
            case 11: //Error
            default: //Default
                $return = BASE_URL_CLUB.'/error.html';
                break;
        }//end switch

        //Return
        return $return;
    }
}